import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const count = ref(0)
  const doubleCount = computed(() => count.value * 2)
  function increment() {
    count.value++
  }

  // const myAxios = axios.create({
  //   baseURL: 'http://127.0.0.1:8000',
  //   withCredentials: true,
  //   headers: {
  //     'Access-Control-Allow-Origin': '*',
  //     'Access-Control-Allow-Credentials': true,
  //     'Cookie': '_ga=GA1.1.2131256908.1736149414; _ga_69MPZE94D5=GS1.1.1736149413.1.1.1736149457.0.0.0;'
  //   },
  // })

  return { count, doubleCount, increment }
})
